package com.service;

import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dao.BoardDAO;

public class BoardReplyCommand implements BoardCommand {

	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) {
		
		try {
			request.setCharacterEncoding("UTF-8");
			
			String num = request.getParameter("num");
			String title = request.getParameter("title");
			String author = request.getParameter("author");
			String content = request.getParameter("content");
			String reqRoot = request.getParameter("reqRoot");
			String reqStep = request.getParameter("reqStep");
			String repIndent = request.getParameter("repIndent");
			
			BoardDAO dao = new BoardDAO();
			dao.reply(num, title, author, content, reqRoot, reqStep, repIndent);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}

}
